-
-
Notifications
You must be signed in to change notification settings - Fork 216
ENH: Air brakes controller functions now support 8-parameter signature #854
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: develop
Are you sure you want to change the base?
ENH: Air brakes controller functions now support 8-parameter signature #854
Conversation
|
@MateusStano could you review this one please? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR solves the issue where air brake controllers relied on global environment variables by adding an environment parameter to the controller function signature. This enables local access to atmospheric conditions without using global variables.
- Added environment parameter support to controller functions (6, 7, or 8 parameters now supported)
- Updated controller initialization to handle the new environment parameter with backward compatibility
- Created test fixtures and standalone test script to demonstrate the new functionality
Reviewed Changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| tests/fixtures/function/function_fixtures.py | Added new test fixture demonstrating environment parameter usage in controller |
| test_environment_parameter.py | Standalone test script showing different controller signatures and environment usage |
| rocketpy/simulation/flight.py | Updated simulation to pass environment parameter to controllers |
| rocketpy/rocket/rocket.py | Updated documentation to describe the new environment parameter |
| rocketpy/control/controller.py | Enhanced controller initialization to support 8-parameter functions and updated call signature |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
a3b63dc to
436080f
Compare
436080f to
9505f3c
Compare
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## develop #854 +/- ##
===========================================
+ Coverage 80.27% 80.37% +0.10%
===========================================
Files 104 106 +2
Lines 12769 13013 +244
===========================================
+ Hits 10250 10459 +209
- Misses 2519 2554 +35 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
9505f3c to
a8abae4
Compare
…d improve environment access
Pull request type
Checklist
black rocketpy/ tests/) has passed locallypytest tests -m slow --runslow) have passed locallyCurrent behavior
here, air brakes controller doesn't pass environment as parameter but uses the global variables.
New behavior
Now, air brakes controller uses env parameter, you can use the file "test_environment_parameter.py" to check functioning.
Breaking change
Additional information
Enter text here...